package demo.security.handler;

import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;

public class DemoAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
	
	public DemoAuthenticationFailureHandler(String defaultFailureUrl) {
		super(defaultFailureUrl);
		
		this.setUseForward(true);
	}
	
//	@Override
//	public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
//			AuthenticationException exception) throws IOException, ServletException {
//		
//		//logger.debug("***onAuthenticationFailure:{}",exception.getMessage());
//		request.setAttribute("error", exception.getMessage());
//		
//		request.getRequestDispatcher(defaultFailureUrl).forward(request, response);		
//	}
	
}
